﻿#pragma once
#include "PropertyEditEntry.h"
#include <QDockWidget>

class DockWidgetPropertyEditEntry : public PropertyEditEntry {
    Q_OBJECT
public:
    enum DockWidgetFeature {
        NoDockWidgetFeatures = QDockWidget::DockWidgetFeature::NoDockWidgetFeatures,
        DockWidgetClosable = QDockWidget::DockWidgetFeature::DockWidgetClosable,
        DockWidgetMovable = QDockWidget::DockWidgetFeature::DockWidgetMovable,
        DockWidgetFloatable = QDockWidget::DockWidgetFeature::DockWidgetFloatable,
        DockWidgetVerticalTitleBar = QDockWidget::DockWidgetFeature::DockWidgetVerticalTitleBar,
    };
    Q_ENUM(DockWidgetFeature)
    Q_DECLARE_FLAGS(DockWidgetFeatures, DockWidgetFeature)
    explicit DockWidgetPropertyEditEntry(QWidget *parent = nullptr);
    ~DockWidgetPropertyEditEntry();
    void setObject(void *object) override;
protected:
    void onTick() override;
private:
    void initUi();
    void retranslateUi();
private:
    struct DockWidgetPropertyEditEntryPrivate;
    QScopedPointer<DockWidgetPropertyEditEntryPrivate> p;
};

Q_DECLARE_OPERATORS_FOR_FLAGS(DockWidgetPropertyEditEntry::DockWidgetFeatures)

